package com.andyou.modules.content.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.andyou.common.persistence.Page;
import com.andyou.common.service.CrudService;
import com.andyou.modules.content.entity.ContentReply;
import com.andyou.modules.content.dao.ContentReplyDao;

/**
 * 回复管理（content_reply）Service
 * @author lgx
 * @version 2020-03-09
 */
@Service
@Transactional(readOnly = true)
public class ContentReplyService extends CrudService<ContentReplyDao, ContentReply> {

	public ContentReply get(String id) {
		return super.get(id);
	}
	
	public List<ContentReply> findList(ContentReply contentReply) {
		return super.findList(contentReply);
	}
	
	public Page<ContentReply> findPage(Page<ContentReply> page, ContentReply contentReply) {
		return super.findPage(page, contentReply);
	}
	
	@Transactional(readOnly = false)
	public int save(ContentReply contentReply) {
		return super.save(contentReply);
	}
	
	@Transactional(readOnly = false)
	public void delete(ContentReply contentReply) {
		super.delete(contentReply);
	}
	
	
    @Transactional(readOnly = false)
	public void batchDelete(List<String> idList) {
		ContentReply contentReply = null;
		for (String id : idList) {
			contentReply = new ContentReply();
			contentReply.setId(id);
			super.delete(contentReply);
		}
	}
}